how to develop the logic to find the second highest digit in the integer